<?php
	include "../ini.php";
	include '../../libraries/xl_lien_he.php';
	$dt_xl_lien_he=new xl_lien_he;
	if (empty($_GET['ma']))
	{
		$_SESSION['type_msg'] = 'error';
		$_SESSION['msg'] = 'Lỗi! Dữ liệu không hợp lệ! Vui lòng kiểm tra lại!';	
		header('Location: '.$_SERVER['HTTP_REFERER']);
		exit;
	}
	$ma=$_GET['ma'];
	$lien_he=$dt_xl_lien_he->xem($ma);
	if($lien_he==NULL)
	{
		$_SESSION['type_msg'] = 'error';
		$_SESSION['msg'] = 'Lỗi! Mã không tồn tại! Vui lòng kiểm tra lại!';	
		header('Location: '.$_SERVER['HTTP_REFERER']);
		exit;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include'../widgets/js_css.php'?>
</head>
<body>
<div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
  
  <?php include '../widgets/sidebar.php'?>
  <div id="main-content"> <!-- Main Content Section with everything -->
  <!--noscript-->
    
    <!-- Page Head --> 
    <!-- End .shortcut-buttons-set -->
    
    <div class="clear"></div>
    <!-- End .clear -->
    
    <div class="content-box"><!-- Start Content Box -->
      
      <div class="content-box-header">
        <h3>Thông tin chi tiết liên hệ</h3>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
          <?php thong_bao()?>
          <p>Họ và tên: <strong><?php echo $lien_he['ho_ten']?></strong></p>
          <p>E-mail: <strong><?php echo $lien_he['email']?></strong></p>
          <p>Ngày: <?php echo $lien_he['ngay_tao']?></p>
          <p>Tiêu đề: <strong><?php echo $lien_he['tieu_de']?></strong></p>
          <p>Nội dung: <?php echo $lien_he['noi_dung']?></p>
          <p style="text-align:center"><?php if($lien_he['trang_thai']==0) echo '<input onclick="window.location=\'tra_loi.php?ma='.$lien_he['ma'].'\'" class="button" type="button" name="tra_loi" value="Trả lời thư" />'?>
              <input class="button" onclick="window.location='danh_sach.php';" type="button" name="tro_ve" value="Trở về" /></p>
        </div>
        <!-- End #tab1 --> 
        
      </div>
      <!-- End .content-box-content --> 
      
    </div>
    <!-- End .content-box -->
    
    <div class="clear"></div>
    <div id="footer"> <small> <!-- Remove this notice or replace it with whatever you want --> 
    <!-- End #footer --> 
    
  </div>
  <!-- End #main-content --> 
</div>
</body>
</html>